/*
 * @Author: MrDotYan 2564217790@qq.com
 * @Date: 2024-09-12 14:58:47
 * @LastEditors: MrDotYan 2564217790@qq.com
 * @LastEditTime: 2024-09-12 15:36:37
 * @FilePath: /webServer/src/model/file/file.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { Column, Entity } from 'typeorm';
import { DBColumns } from '../';
import { FileSchema } from '../../schema';

@Entity('file')
export class File extends DBColumns implements FileSchema {
  @Column({
    type: 'varchar',
    length: 255,
    nullable: false,
    default: null,
    comment: '文件名称',
  })
  fileName: string;

  @Column({
    type: 'varchar',
    length: 255,
    nullable: false,
    default: null,
    comment: '文件存储路径',
  })
  fileUrl: string;

  @Column({
    type: 'varchar',
    length: 255,
    nullable: false,
    default: null,
    comment: '文件媒体类型',
  })
  mimeType: string;
  @Column({
    type: 'varchar',
    length: 255,
    nullable: false,
    default: null,
    comment: '上传用户名',
  })
  createUserName: string;
  @Column({
    type: 'varchar',
    length: 255,
    nullable: false,
    default: null,
    comment: '上传用户ID',
  })
  createUserId: string;
}
